feat: store completions in $XDG_CONFIG_HOME instead of $HOME#50
Merged
renancaraujo merged 6 commits intoVeryGoodOpenSource:mainfrom Feb 10, 2023
Merged
Conversation
Member
erickzanardo
left a comment
There was a problem hiding this comment.
Could we add a test to verify the new behaviour?
Contributor
renancaraujo
left a comment
There was a problem hiding this comment.
Looking good, thanks for the contribution!
We need a quick test for the new use case though.
renancaraujo
previously approved these changes
Feb 10, 2023
$XDG_CONFIG_HOME instead of $HOME
wolfenrain
reviewed
Feb 10, 2023
Co-authored-by: Erick <erickzanardoo@gmail.com>
fc3a99b to
da84db5
Compare
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
wolfenrain
reviewed
Feb 10, 2023
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
wolfenrain
approved these changes
Feb 10, 2023
renancaraujo
approved these changes
Feb 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
READY/IN DEVELOPMENT/HOLD
Description
A lot of programs write their configuration files directly to their users'
$HOME, making the output ofls -laan unmanageable mess.XDG Base Directory Specification helps with keeping the home directory tidy by providing a convention that well-behaved programs can follow when deciding where to store certain types of files.
This PR introduces an attempt to add
dart-cli-completion/to$XDG_CONFIG_HOME(if set) instead of the top-level home folder. On my machine it results in~/.config/dart-cli-completion. The behavior remains unchanged for users who have not explicitly set this variable (assuming that they don't care 🙂).The XDG specification should also be valid for Windows systems, but I'm not familiar enough with Windows to know whether it's a good idea to propagate this change there as well.
Type of Change
dart-cli-completionfolders (they will have to delete the old one manually)